#include "dev_layout.h"
#include "modbus.h"

#define  LED1       HAL_PORT_B,HAL_Pin_0
#define  LED2       HAL_PORT_B,HAL_Pin_7
#define  LED3       HAL_PORT_B,HAL_Pin_14


void DeviceInit()
{
 // init cpu system clock
 dev_handle.cpu->systemclock();
 
 //led dev init
 dev_handle.led->init(LED1);
 dev_handle.led->init(LED2);
 dev_handle.led->init(LED3);
}


int main()
{ 
    DeviceInit();
    ModbusInit();
    while(1)
    {
        ModbusEvent();
    }
	return 0;   
}
